<?php

namespace App\Http\Controllers\mail;

use Illuminate\Http\Request;

use App\Http\Requests;
use App\Http\Controllers\Controller;
use Mail;

class MailController extends Controller
{
	public function youDaoPc(Request $request){
		$data= $request->all();
		
		Mail::send('mail.youdao', $data, function($message){
			$message->to('239344370@qq.com','佑道电脑端预约通知')->subject("佑道预约通知");
		});

		return view('mail.success');
	}

	public function youDaoPhone(Request $request){
		$data= $request->all();
		
		Mail::send('mail.youdao', $data, function($message){
			$message->to('239344370@qq.com','佑道手机端预约通知')->subject("佑道预约通知");
		});

		return view('mail.success');
	}

	public function thyroid(Request $request){
		
		$data= $request->all();
		
		Mail::send('mail.thyroid', $data, function($message){
			$message->to(config('mail.sendTo'),'甲状腺预约通知')->subject("甲状腺预约通知");
		});

		return view('mail.success');
	}

	public function jjThyroid(Request $request){
		$data= $request->all();
		
		Mail::send('mail.thyroid', $data, function($message){
			$message->to('239344370@qq.com','甲状腺预约通知')->subject("甲状腺预约通知");
		});

		return view('mail.success');
	}

	public function phoneThyroid(Request $request){

		$data=$request->all();

		Mail::send('mail.phone-thyroid',$data, function($message){
			$message->to("239344370@qq.com",'甲状腺预约通知')->subject("甲状腺预约通知");
		});

		return view('mail.success');
	}

	public function jjPhoneThyroid(Request $request){
		$data=$request->all();

		Mail::send('mail.phone-thyroid',$data, function($message){
			$message->to("239344370@qq.com",'甲状腺预约通知')->subject("甲状腺预约通知");
		});

		return view('mail.success');
	}

	public function phoneBreastOnline(Request $request){

		$data=$request->all();

		Mail::send('mail.breast_online',$data, function($message){
			$message->to("239344370@qq.com",'乳腺预约通知')->subject("乳腺预约通知");
		});

		return view('mail.success');
	}

	public function pcBreast(Request $request){
		$data= $request->all();
		
		Mail::send('mail.thyroid', $data, function($message){
			$message->to('239344370@qq.com','乳腺预约通知')->subject("乳腺预约通知");
		});

		return view('mail.success');
	}

	public function pcBreastII(Request $request){
		$data= $request->all();
		
		Mail::send('mail.pc-breastII', $data, function($message){
			$message->to('239344370@qq.com','乳腺预约通知')->subject("乳腺预约通知");
		});

		return view('mail.success');
	}

	public function phoneBreast(Request $request){
		$data=$request->all();

		Mail::send('mail.phone-breast',$data, function($message){
			$message->to(config('mail.sendTo'),'乳腺预约通知')->subject("乳腺预约通知");
		});

		return view('mail.success');
	}

	public function phoneBmi(Request $request){
		$data=$request->all();

		Mail::send('mail.phone-bmi',$data,function($message){
			$message->to('239344370@qq.com','减重预约通知')->subject("减重预约通知");
		});

		return view('mail.success');
	}

	public function activity(Request $request){
		$data=$request->all();

		Mail::send('mail.activity',$data, function($message){
			$message->to(config('mail.sendTo'),'预约通知')->subject("预约通知");
		});

		return view('mail.success');
	}

	public function pcBmiIndex(Request $request){
		$data=$request->all();

		Mail::send('mail.pc-bmi-index',$data, function($message){
			$message->to('239344370@qq.com','减重预约通知')->subject("减重预约通知");
		});

		return view('mail.success');
	}

	public function pcBmiRoute(Request $request){
		$data=$request->all();

		Mail::send('mail.pc-bmi-route',$data, function($message){
			$message->to('239344370@qq.com','减重预约通知')->subject("减重预约通知");
		});

		return view('mail.success');
	}

	public function pcBmiOnline(Request $request){
		$data=$request->all();

		Mail::send('mail.pc-bmi-online',$data, function($message){
			$message->to('239344370@qq.com','减重预约通知')->subject("减重预约通知");
		});

		return view('mail.success');
	}

	public function newPhone(Request $request){
		$data=$request->all();

		Mail::send('mail.new-phone',$data, function($message){
			$message->to('239344370@qq.com','减重预约通知')->subject("减重预约通知");
		});

		return view('mail.success');
	}

	public function phoneKuaisu(Request $request){
		$data=$request->all();

		$bingfaTemp = "";

		Mail::send('mail.phone_bmi_kuaisu',$data, function($message){
			$message->to('239344370@qq.com','快速预约通道')->subject("快速预约通道");
		});

		return view('mail.success_kuaisu');
	}

	public function newActivity(Request $request){
		$data=$request->all();

		// dd($data);

		Mail::send('mail.newActivity',$data,function($message){
			$message->to('371193395@qq.com','免费减重手术公益活动(报名信息)')->subject('免费减重手术公益活动(报名信息)');
		});

		return view('mail.success_kuaisu');
	}
}
